home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 20
/
Cream of the Crop 20 (Terry Blount) (1996).iso
/
program
/
n_b_v203.zip
/
SCANR.DMO
< prev
next >
Wrap
Text File
|
1996-07-04
|
2KB
|
46 lines
$if 0
┌──────────────────────────╖ PowerBASIC v3.20
┌──┤ DASoft ╟──────────────────────┬──────────────────╖
│ ├──────────────────────────╢ Copyright 1995 │ DATE: 1995-10-01 ╟─╖
│ │ FILE NAME SCANR .DMO ║ by ╘════════════════─ ║ ║
│ │ ║ Don Schullian, Jr. ║ ║
│ ╘══════════════════════════╝ ║ ║
│ A license is hereby granted to the holder to use this source code in ║ ║
│ any program, commercial or otherwise, without receiving the express ║ ║
│ permission of the copyright holder and without paying any royalties, ║ ║
│ as long as this code is not distributed in any compilable format. ║ ║
│ IE: source code files, PowerBASIC Unit files, and printed listings ║ ║
╘═╤═════════════════════════════════════════════════════════════════════╝ ║
│ .................................... ║
╘═══════════════════════════════════════════════════════════════════════╝
$endif
'.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°
' ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° °
$INCLUDE "DAS-NB01.INC"
COLOR 7, 0
CLS
? "┌────────────────────────────────────────────────────────────
? "│ fSCANr% ( Start%, ANY, Chars?? )
? "├────────────────────────────────────────────────────────────────
? "│ This function is just like fSCAN% but it searches from right to
? "│ left. Have a look at SCAN.DMO to get the general picture.
? "│ If Start% is 0 then the function will automatically start at the
? "│ end of the string so there is no need to do a LEN( V$ ),etc.
? "│ Have a look at SCANnot.DMO too.
? "└─────────────────────────────────────────────────────────────────────────
?
V$ = "This is a test."
PRINT V$
P1% = fSCANr%( 0, V$, &h0074 ) ' looking for the last "t"
LOCATE 12, P1% : PRINT CHR$(24)
LOCATE 13, P1% : PRINT "└────────────────────────── t"
P2% = fSCANr%( 0, V$, &h7320 ) ' looking for the last "s "
LOCATE 12, P2% : PRINT CHR$(24,24)
LOCATE 13, P2% : PRINT "││"
LOCATE 14, P2% : PRINT "└┴──────────────────────────────── s<space>